﻿@if (MenuItem.IsVisible)
{
    @if (MenuItem.Items != default && MenuItem.Items.Any())
    {
        <SubMenu Key="@MenuItem.Name">
            <TitleTemplate>
                <Icon Type="@(MenuItem.Icon)" Theme="outline"></Icon>
                <span style="margin-left:6px">@MenuItem.DisplayName</span>
            </TitleTemplate>
            <ChildContent>
                @foreach (var item in MenuItem.Items)
                {
                    <MainMenuItem MenuItem="item" />
                }
            </ChildContent>
        </SubMenu>
    }
    else
    {
        <MenuItem Key="@MenuItem.Name" Icon="@(MenuItem.Icon)">
            <MenuLink Href="@MenuItem.Url">@MenuItem.DisplayName</MenuLink>
        </MenuItem>
    }
}
@code {
    [Parameter]
    public Abp.Application.Navigation.UserMenuItem MenuItem { get; set; }
}
